import * as $echarts from 'echarts';

export default {
	publicInitChart(dom,options){
		let myChart = $echarts.getInstanceByDom(document.getElementById(dom)) || $echarts.init(document.getElementById(dom));
		myChart.setOption(options);
		window.addEventListener('resize',function (){
			myChart.resize();
		})
	},
}